<?php try { 
$phar = new PharData?('myphar.tar'); 
$phar->extractTo('/full/path'); 
// extract all files $phar->extractTo('/another/path', 'file.txt'); 
// extract only file.txt $phar->extractTo('/this/path',
array('file1.txt', 'file2.txt'); 
// extract 2 files only 
$phar->extractTo('/third/path', null, true); 
// extract all files, and overwrite } catch (Exception $e) { 
// handle errors 
} 